<template>
  <el-form
        :inline="formInline"
        ref="formRef"
        :model="formData"
        :rules="formRules"
        :label-width="labelWdth"
        label-position="right"
        :style="`align-items: center;`"
      >
  <slot name="add" :formData="formData" :currentUpdateId="currentUpdateId" />
</el-form>
</template>
<script lang="ts" setup>
import { reactive } from 'vue';


const props = withDefaults(defineProps<{
  //是否开启添加表单换行
  formInline?: boolean
  //同意表格标题的宽度
  labelWdth?: string
  //添加表单rule验证
  formRules?: { [name: string | number]: any }
  formData:any[]
}>(),{
  formInline: false,
  labelWdth: "100px",
  formRules: () => {
      return {
        name: [{ required: true, trigger: "blur", message: "请输入标题" }]
      }
    },
})
// let formData = reactive<any>({})

let emit = defineEmits(['update:formData'])

</script>